import request from '@/utils/request'

export function configTable(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/config/table`,
    method: 'post',
    data: query
  })
}

export function configLoad(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/config/load`,
    method: 'get',
    params: query
  })
}

export function configSave(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/config/save`,
    method: 'post',
    data: query
  })
}

export function configDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/config/delete`,
    method: 'post',
    data: query
  })
}

export function siteLoad() {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/site/load`,
    method: 'get'
  })
}

export function siteSave(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/site/save`,
    method: 'post',
    data: query
  })
}
